package com.itrus.auth.demo.company.ocr;

import com.itrus.auth.demo.core.Config;
import com.itrus.auth.demo.person.ocr.OcrBasicAuth;

import java.util.Map;

/**
 * @author : peigen
 * @since: 2023/8/2 17:30
 */
public class BusinessCardOcr extends OcrBasicAuth {

    protected String SERVICE_CODE = "idb1001";
    protected String REQUEST_PATH = "/image/businessLicense";

    public BusinessCardOcr(Config config) {
        super.config = config;
    }

    /**
     * 营业执照 OCR
     * @param base64File
     */
    public void auth(String base64File) {
        Map<String, String> requestMap = getRequestMap(base64File);

        doRequest(REQUEST_PATH, requestMap);
    }

    @Override
    public String getServiceCode() {
        return SERVICE_CODE;
    }
}
